Skip to content

Add Infrastructure | OpenFlake job template to deploy OpenFlake on OpenShift - #382

Merged
IPvSean merged 10 commits into
mainfrom
feature/openflake-job-template
Oct 30, 2026
Merged

IPvSean merged 10 commits into
mainfrom
feature/openflake-job-template

Conversation

@rlopez133

Copy link
Copy Markdown
Contributor

Adds a job template that deploys [OpenFlake](fork of @zjleblanc Openflake found at https://github.com/rlopez133/open-flake) — a lightweight ITSM platform with a ServiceNow-compatible REST API — on OpenShift.

This gives demos a real incident/change backend without needing a ServiceNow instance. The ServiceNow-compatible endpoints mean servicenow.itsm content can point at it with only a URL change.

Not auto-deployed

The template is seeded by APD | Single demo setup with demo: infrastructure, but nothing deploys until someone launches it. Users land in Job Templates, see
Infrastructure | OpenFlake, and run it.

What's included

Path Purpose
infrastructure/setup.yml One new entry appended to controller_templates
infrastructure/openflake/provision.yml Entry playbook, dispatches on the Operation survey answer
infrastructure/openflake/tasks/ preflight, install, verify, uninstall
infrastructure/openflake/chart/ Vendored Helm chart
infrastructure/docs/openflake.md Docs, linked from infrastructure/README.md

Survey: Operation (install/uninstall), namespace, Route hostname (optional), image tag. Runs on Product Demos EE with the existing OpenShift Credential.

@IPvSean IPvSean left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid addition — install/uninstall survey pattern matches Vault, helm comes from the EE instead of a download, TLS posture follows the OpenShift credential, and the uninstall ownership probe before namespace delete is the right safeguard.

A few notes (inlines below). Biggest concrete fix: the vendored chart’s default image.registry still points at quay.io/zleblanc, which 404s; the playbook overrides it to quay.io/rlopez133/openflake (that path works), but a raw helm install of the chart as shipped would pull missing images. Align the chart defaults with what the JT uses.

Otherwise this looks mergeable after that tweak. Branch is also 1 commit behind main — worth an update before merge.

Comment thread infrastructure/openflake/provision.yml Resolved
Comment thread infrastructure/docs/openflake.md Resolved
rlopez133 and others added 9 commits October 29, 2026 09:17
Seeds a job template under the infrastructure demo that deploys OpenFlake
-- a lightweight ITSM platform with a ServiceNow-compatible REST API -- on
OpenShift. It is not auto-deployed: the template is created at demo setup
and the install only happens when someone launches it.

ACTION becomes an install/uninstall survey choice (the Infrastructure |
HashiCorp Vault pattern), the cached password lookup is replaced by reading
the password the chart generates back out of its Secret, and the access
details are reported with debug. The Helm chart is vendored under
infrastructure/openflake/chart so the Ansible Product Demos project ships
the chart it installs.

The chart directory is excluded from ansible-lint: it is Go templates and
chart metadata, not Ansible YAML.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The ported preflight downloaded helm from get.helm.sh on every run, which
was never needed: all three EE definitions bake helm v3.15.3 into
/usr/local/bin (execution_environments/apd-ee-{25,26,27}.yml, append_final).
The template sets no execution environment, so it runs on Product Demos EE
as the organization default and helm is already on PATH. Preflight now just
checks for it and fails with a pointer to the EE definition.

Also addresses three findings from the automated security review:

- validate_certs was hardcoded false. It now follows K8S_AUTH_VERIFY_SSL
  from the attached credential, with K8S_AUTH_SSL_CA_CERT passed to helm as
  ca_cert -- an inline PEM is spilled to a temp file first, as
  infrastructure/ao/install.yml does. The k8s modules in the same play
  already read both env vars themselves, so helm now agrees with them
  instead of silently contradicting the credential.

- The admin password was printed to job output, which AAP retains
  indefinitely and shows to anyone with read access on the job. It now
  prints the `oc get secret` command to retrieve it instead; the Secret is
  gated by the same cluster permissions the job template already needs.

- The uninstall path deleted a namespace named by a free-text survey field.
  It now proves the release is in that namespace first, by probing for
  app.kubernetes.io/part-of=openflake before the helm uninstall strips
  those labels, and both names are validated as RFC 1123 labels up front.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Restores the no_log that was dropped when the install stopped decoding the
admin password: k8s_info returns the whole Secret, so ADMIN_PASSWORD,
SECRET_KEY and POSTGRESQL_PASSWORD land in the registered variable even
though only metadata.name is read from it.

The uninstall ownership probe had the same problem -- Secret is removed from
its loop rather than muted, so it fetches no secret body at all and its
output stays readable when the check fails. Deployment and StatefulSet are
enough to prove the release is in the namespace.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Nothing in product-demos should point at the private workshop repo the
OpenFlake content came from. Rewrites the three comments and the Known
Issues entry that named it, including one pre-existing reference in the AO
LiteMaaS wiring task.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Labels are not created on demand: controller_job_templates fails with
"Could not find label entry with name itsm" unless the label already exists.
The set is declared in controller_labels (common/setup.yml) and mirrored in
utils/apd-domains.json and the domain bookmarklet, so it is curated rather
than ad hoc. infrastructure and openshift are both declared and are enough
to place this template alongside the other OpenShift infra jobs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Shorter and consistent with Infrastructure | HashiCorp Vault. The platform
is already conveyed by the openshift label and the description.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Demo users need to copy the login out of the job rather than shell into the
cluster for it. AAP retains job output and shows it to anyone with read
access on the job, which is an accepted trade for a demo workload on an
ephemeral cluster.

The Secret fetch and the decode stay no_log, so only the admin password is
exposed -- the same Secret also carries SECRET_KEY and POSTGRESQL_PASSWORD,
which nobody needs to read off the screen.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The images now live alongside the other demo images (rosa-ee, ao-ee,
aws_ee) instead of a personal Quay namespace, so the demo does not depend
on one contributor's account.

The chart defaults pointed at quay.io/zleblanc, which 404s, and relied on
provision.yml to override them -- a plain `helm install` of the vendored
chart got ImagePullBackOff. Chart and playbook defaults now agree, and
pullPolicy moves to Always in the chart too since stable is mutable.

Copied with skopeo, so the digests at acme_corp match the source exactly.
Both repos verified public and anonymously pullable.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@rlopez133
rlopez133 force-pushed the feature/openflake-job-template branch from c0bdbcf to b9da749 Compare October 29, 2026 14:19
@rlopez133

Copy link
Copy Markdown
Contributor Author

@IPvSean should be good now i hope :)

@IPvSean IPvSean self-assigned this Oct 30, 2026
@IPvSean

IPvSean commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

All review threads are resolved. Ready to approve/merge when CI finishes.

@IPvSean IPvSean left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after fixes

@IPvSean
IPvSean merged commit 49b9dcb into main Oct 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants